{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "原创教程，版权所有。\n",
    "\n",
    "同济子豪兄B站视频专栏：https://space.bilibili.com/1900783\n",
    "\n",
    "玩转UCI心脏病二分类数据集，课件、代码、答疑互动：https://t.zsxq.com/Z7yNZBu\n",
    "\n",
    "子豪兄Python交流QQ群：1077638784\n",
    "\n",
    "子豪兄Kaggle数据科学竞赛交流：481041896\n",
    "\n",
    "微信公众号：人工智能小技巧\n",
    "\n",
    "2020-05-15\n",
    "\n",
    "# 本节概述\n",
    "\n",
    "安装本课程要用到的Python第三方工具包，包括科学计算、数据分析、可视化、机器学习、机器学习可解释性分析的常用工具包。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "在Ipython中，感叹号开头的python代码，可起到运行命令行命令的作用。\n",
    "\n",
    "你也可以直接将感叹号后面的内容复制粘贴到命令行中运行。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 安装数据分析及可视化第三方工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install numpy pandas matplotlib seaborn wheel pandas_profiling jupyter notebook -i https://pypi.tuna.tsinghua.edu.cn/simple"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 安装辅助工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install graphviz pydotplus -i https://pypi.tuna.tsinghua.edu.cn/simple"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "将graphviz的bin目录加到环境变量PATH中，比如对于Windows系统，将类似于`C:/Program Files (x86)/Graphviz2.38/bin/`的路径加入环境变量PATH。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# import os\n",
    "# os.environ[\"PATH\"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 安装机器学习第三方工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install scikit-learn -i https://pypi.tuna.tsinghua.edu.cn/simple"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 安装机器学习可解释性第三方工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install pdpbox eli5 -i https://pypi.tuna.tsinghua.edu.cn/simple"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 安装机器学习可解释分析工具shap"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install shap -i https://pypi.tuna.tsinghua.edu.cn/simple"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "如果安装shap库时遇到bug，提示`error: Microsoft Visual C++ 14.0 is required. `\n",
    "\n",
    "请更换至linux或macos操作系统。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
